#include "tabulate.hpp"

using namespace tabulate;

// 编译： g++ -std=c++11 main.cpp -Isingle_include -o main.exe
int main()
{
    Table movies;
    movies.add_row({"S/N", "Title", "Director", "Year", "Gross"});
    movies.add_row({"1", "The Shawshank Redemption", "Frank Darabont", "1994", "$28.34M"});
    movies.add_row({"2", "The Godfather", "Francis Ford Coppola", "1972", "$134.97M"});
    movies.add_row({"3", "The Dark Knight", "Christopher Nolan", "2008", "$534.86M"});

    movies[0].format().font_color(Color::yellow).font_align(FontAlign::center).font_style({FontStyle::bold});

    for (size_t i = 1; i < movies.size(); ++i)
    {
        movies[i].format().font_align(FontAlign::center);
    }

    std::cout << movies << std::endl;
    return 0;
}